package com.qmth.gkwb.api;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.qmth.gkwb.data.document.Student;
import com.qmth.gkwb.data.repository.StudentUserRepo;
import com.qmth.gkwb.data.security.UserService;

@RestController
@RequestMapping("api/studentuser")
public class StudentUserApi {

	@Autowired private StudentUserRepo studentUserRepo;
	@Autowired private UserService userService;
	
	@RequestMapping(value="{id}",method=RequestMethod.PUT)
	public Student modifyPassword(@PathVariable String id,@RequestBody String newPwd)
		throws Exception{
		return userService.modifyPassword(id, newPwd);
	}
}
